package br.perfiman.dao;

import java.util.Date;
import java.util.List;

import javax.ejb.Local;

import br.perfiman.model.Asset;
import br.perfiman.model.Trade;

/**
 *
 * @author Wagner Costa
 * @since 27/12/2007
 * @version 1.0
 *
 */
@Local
public interface TradeDAOService extends AbstractDAOService<Trade>{
	
	/**
	 * Returns the list of trades with the asset in date specified.
	 * 
	 * @author Wagner Costa
	 * @since 10/03/2008
	 * @version 1.0
	 * @param asset
	 * @param date
	 * @return
	 */
	List<Trade> getTradesByDate(Asset asset, Date date);
	
	/**
	 * Returns the list of trades that were realized after the trade passed by parameter
	 * 
	 * @author Wagner Costa
	 * @since 23/04/2008
	 * @version 1.0
	 * @param trade
	 * @return
	 */
	List<Trade> getNewTrades(Trade trade);

	/**
	 * Retrieves the Trades who has the same values as passed by example
	 *
	 * @author Wagner Costa
	 * @since 25/03/2008
	 * @version 1.0
	 * @param Trade
	 * @throws Exception
	 */
	List<Trade> findByExample(Trade trade);
	
	/**
	 * Retrieves the Trades who was done in specified period
	 * 
	 * @author Wagner Costa
	 * @since 02/04/2008
	 * @version 1.0
	 * @param initialDate
	 * @param finalDate
	 * @param type
	 * @return
	 */
	List<Trade> retrieveTradesByPeriod(Date initialDate, Date finalDate, Integer Type);
}
